package cursopoo.herramientas

import java.awt.Graphics
import java.awt.Graphics2D
import java.awt.RenderingHints
import javax.swing.JPanel
import java.awt.Shape

class PanelGrafico extends JPanel {
    public figuras = []

    protected void paintComponent(Graphics g) {
        super.paintComponent(g)
        Graphics2D g2d = g as Graphics2D
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)
        figuras.each { it.paintOn(g2d) }
    }
}
